<template>
  <div class="search-container">
    <form action="/">
      <van-search
        v-model="searchText"
        show-action
        placeholder="请输入搜索关键词"
      />
    </form>

    <search-history />

    <search-result />

    <search-suggestion />
  </div>
</template>

<script>
import SearchHistory from './components/search-history.vue'
import SearchResult from './components/search-result.vue'
import searchSuggestion from './components/search-suggestion.vue'

export default {
  components: {
    SearchHistory,
    SearchResult,
    searchSuggestion
  },
  data() {
    return {
      searchText: ''
    }
  }
}
</script>

<style lang="less" scoped>
.search-container {
  padding-top: 108px;

  .van-search--show-action {
    background-color: #3296fa;
    .van-search__action {
      color: #fff;

      &:active {
        background-color: #3296fa;
      }
    }

  }
  .van-search {
    position: fixed;
    z-index: 999;
    left: 0;
    right: 0;
    top: 0;
    height: 108px;
  }

}
</style>
